package com.spring.demo2;

import org.springframework.jdbc.core.support.JdbcDaoSupport;


public class AccountDaoImpl extends JdbcDaoSupport implements AccountDao {

	@Override
	public void outMoney(String out,Double money) {
		String sql = "update account set account_money = account_money - ? where account_name = ? ";
		this.getJdbcTemplate().update(sql,money,out);
	}

	@Override
	public void inMoney(String in,Double money) {
		String sql = "update account set account_money = account_money +? where account_name =?";
		this.getJdbcTemplate().update(sql,money,in);
	}

}
